package pat;

import java.util.Scanner;
import java.util.Vector;
public class Password {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int sum = 0;
		Vector<String> v = new Vector<String>();
		Vector<String> vv = new Vector<String>();
		int n = s.nextInt();
		s.nextLine();
		for (int i = 0; i < n; i++) {
			v.add(s.nextLine());
		}

		for (int i = 0; i < v.size(); i++) {

			String str = v.get(i);
			String[] strr = str.split(" ");
			for (int j = 0; j < strr[1].length(); j++) {
				char ch = strr[1].charAt(j);
				if (ch == '1' | ch == 'O' |ch == 'l' | ch == '0') {
					sum++;
					String sing = null;
					sing = strr[1].replace('1', '@');
					sing = sing.replace('O', 'o');
					sing = sing.replace('l', 'L');
					sing = sing.replace('0', '%');
					String ss = strr[0] + " " + sing;
					vv.add(ss);
					break;
				}
			}

		}

		if (sum > 0) {
			System.out.println(sum);
			for (int i = 0; i < vv.size(); i++) {
				System.out.println(vv.get(i));
			}
		} else {
			if (n == 1) {
				System.out.print("There is " + n
						+ " account and no account is modified");
			} else {
				System.out.print("There are " + n
						+ " accounts and no account is modified");
			}
		}
	}

}
